import {
	createRouter,
	// createWebHashHistory, // hash
	createWebHistory, // history
} from "vue-router";

// import Home from "../views/Home/index.vue";
// import About from "../views/About/index.vue";

export default createRouter({
	// 前端路由的模式
	history: createWebHistory(),
	// 前端路由配置项
	routes: [
		{
			path: "/home",
			name: "Home",
			component: () => import("../views/Home/index.vue"),
		},
		{
			path: "/about",
			name: "About",
			component: () => import("../views/About/index.vue"),
		},
		{
			path: "/",
			redirect: "/home",
		},
	],
});
